Repository navigation
New flight: fill responsible person and reason for visit - #55
Merged
Merged
Conversation
Both rarely change between flights, but no import path set them, so they were re-entered in the flight editor after every creation. - Reason for visit defaults to "Based" when the destination is the aircraft's usual base, "Short Term Visit" otherwise; falls back to the copied flight's value when the aircraft has no base. - Responsible person defaults to the most recent one who is aboard, else the first crew member. - "Same as ..." and "Choose another flight..." carry the source flight's responsible person, reason and document choices. - Both shown as editable rows on the people step. - Repeating a previous flight now carries reason for visit and document choices; a route import only clears a responsible person an import set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The responsible person and the reason for visit rarely change between flights, but no import path filled them. The clipboard, Weather and Autorouter imports cleared them, the "Same as …" chip didn't copy them, and repeating a previous flight dropped the reason. So both had to be re-entered in the flight editor after every flight was created.
What
Flight.defaultReasonForVisit). If the aircraft has no base on file, it uses the copied flight's value.PeopleSuggestion.defaultResponsiblePerson).PeopleSuggestion.source).chosenDocNumbers. A route import only clears a responsible person that an earlier import set, the same rule the crew already follows.The design doc
designs/flight-import.mdis updated.Testing
flyfun-formsTestspass, including new tests for the reason rule, the responsible-person default and the chip's source flight.testPasteFlightPlanFillsRouteAndCreatesAircrafttapped Create Flight before the people step had drawn it; it now waits for the button and passes. The full UI suite was not re-run after that fix.🤖 Generated with Claude Code